// 库存管理接口
import request from "@/common/request.js";
const api = {
  device: "/device_device/",
  device_classify: "/device_classify/",
  device_repair_record: "/device_repair_record/",
};

const deDeviceApi = {
  get_device_repair_record(id) {
    return request({
      url: api.device_repair_record + id,
      method: "get",
    });
  },
  get_device_classify(params) {
    return request({
      url: api.device_classify,
      method: "get",
      params,
    });
  },
  get_device(params) {
    return request({
      url: api.device,
      method: "get",
      params,
    });
  },

  device_detail(id) {
    return request({
      url: api.device + id,
      method: "get",
    });
  },

  post_device(data) {
    return request({
      url: api.device,
      method: "post",
      data,
    });
  },

  patch_device(data, id) {
    return request({
      url: api.device + id + "/",
      method: "patch",
      data,
    });
  },

  delete_device(id) {
    return request({
      url: api.device + id + "/",
      method: "delete",
    });
  },
};
export default deDeviceApi;
